﻿@model IEnumerable<OplDataEntry.Models.PlayerTeamSeason>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Player2.Crew.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Season.SeasonName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Team.TeamName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.FixtureId)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Run6)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Run4)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Run3)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Run2)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Run1)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Dot)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.OutBy)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.BallsFaced)
        </th>
        <th>
            CaughtBY
        </th>
        <th>
            RunOutBY
        </th>
        <th>
           BowledBy
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Wickets)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Catches)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Hatricks)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Wide)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.NoBall)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.BallsBowled)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.RunsGiven)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model)
{
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Player2.Crew.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Season.SeasonName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Team.TeamName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.FixtureId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Run6)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Run4)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Run3)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Run2)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Run1)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Dot)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.OutBy)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.BallsFaced)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Player1.Crew.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Player3.Crew.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Player.Crew.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Wickets)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Catches)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Hatricks)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Wide)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.NoBall)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.BallsBowled)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.RunsGiven)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id = item.ID }) |
            @Html.ActionLink("Details", "Details", new { id = item.ID }) |
            @Html.ActionLink("Delete", "Delete", new { id = item.ID })
        </td>
    </tr>
}

</table>
